import request from '@/utils/request'

// 查询请假单列表
export function listFrom(query) {
  return request({
    url: '/mes/md/from/list',
    method: 'get',
    params: query
  })
}

// 查询请假单详细
export function getFrom(lfId) {
  return request({
    url: '/mes/md/from/' + lfId,
    method: 'get'
  })
}

// 新增请假单
export function addFrom(data) {
  return request({
    url: '/mes/md/from',
    method: 'post',
    data: data
  })
}

// 修改请假单
export function updateFrom(data) {
  return request({
    url: '/mes/md/from',
    method: 'put',
    data: data
  })
}

// 删除请假单
export function delFrom(lfId) {
  return request({
    url: '/mes/md/from/' + lfId,
    method: 'delete'
  })
}
